package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.uuid.IdUtils;
import com.ruoyi.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalconsionMapper;
import com.dime.physical.domain.DimePhysicalconsion;
import com.dime.physical.service.IDimePhysicalconsionService;

/**
 * 人员小组结论Service业务层处理
 * 
 * @author Tiny
 * @date 2023-09-14
 */
@Service
public class DimePhysicalconsionServiceImpl implements IDimePhysicalconsionService 
{
    @Autowired
    private DimePhysicalconsionMapper dimePhysicalconsionMapper;

    /**
     * 查询人员小组结论
     * 
     * @param id 人员小组结论主键
     * @return 人员小组结论
     */
    @Override
    public DimePhysicalconsion selectDimePhysicalconsionById(String id)
    {
        return dimePhysicalconsionMapper.selectDimePhysicalconsionById(id);
    }

    /**
     * 查询人员小组结论列表
     * 
     * @param dimePhysicalconsion 人员小组结论
     * @return 人员小组结论
     */
    @Override
    public List<DimePhysicalconsion> selectDimePhysicalconsionList(DimePhysicalconsion dimePhysicalconsion)
    {
        return dimePhysicalconsionMapper.selectDimePhysicalconsionList(dimePhysicalconsion);
    }

    /**
     * 新增人员小组结论
     * 
     * @param dimePhysicalconsion 人员小组结论
     * @return 结果
     */
    @Override
    public int insertDimePhysicalconsion(DimePhysicalconsion dimePhysicalconsion)
    {
        dimePhysicalconsion.setId(IdUtils.fastUUID());
        dimePhysicalconsion.setCreateBy(SecurityUtils.getUsername());
        dimePhysicalconsion.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalconsionMapper.insertDimePhysicalconsion(dimePhysicalconsion);
    }

    /**
     * 修改人员小组结论
     * 
     * @param dimePhysicalconsion 人员小组结论
     * @return 结果
     */
    @Override
    public int updateDimePhysicalconsion(DimePhysicalconsion dimePhysicalconsion)
    {
        dimePhysicalconsion.setUpdateBy(SecurityUtils.getUsername());
        dimePhysicalconsion.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalconsionMapper.updateDimePhysicalconsion(dimePhysicalconsion);
    }

    /**
     * 批量删除人员小组结论
     * 
     * @param ids 需要删除的人员小组结论主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalconsionByIds(String[] ids)
    {
        return dimePhysicalconsionMapper.deleteDimePhysicalconsionByIds(ids);
    }

    /**
     * 删除人员小组结论信息
     * 
     * @param id 人员小组结论主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalconsionById(String id)
    {
        return dimePhysicalconsionMapper.deleteDimePhysicalconsionById(id);
    }
}
